home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 12 / Developer Source Volume 12 (I-MODE Publications, Inc.)(1999).iso / visua / nov97 / masof106.gif < prev    next >
Graphics Interchange Format  |  1998-06-08  |  57KB  |  474x534  |  4-bit (16 colors)
Labels: text | screenshot | document | number | font | parallel
OCR: Built-In Type DatainputStream Method and Description boolean readBoolean: Reads a single byte from the input stream. A zero byte means False, while any other value means True byłė readByte: No. different than just plain read, except that a byte is returned instead of the same byte cast as an int. readUnsignedByte returns exactly the same value that the read method returns. The only difference is that you will not get a - 1 value al the end of the input stream, which is what read will return. You will instead get an EOFException thrown when the end of the input stream is reached char readChar: A single Unicode (16-bit) character is returned. The first byte read becomes the high byte of the Unicode character sequence, and the second byte read becomes the low byte of the Unicode character sequence: This method blocks the calling thread (i.e. prevents it from executing further) until both bytes are read double readDouble: Reads an eight-byte double-precision floating point number from the input stream. This method will block until all eight bytes are read readFloat: Reads o 32-bit single-precision floating-point number from the encapsulated input stream. This method will block until all four byles are read from the input stream, short readShort: Reads a 16-bit signed integer value from the encapsulated input stream. This method will block the calling thread until both bytes are read from the input stream, readUnsignedShort will read the same 16 bits from the input stream, but will load them into a 32-bit int variable int readint: Reads a signed 32-bit integer from the encapsulated input stream. This method will block until all four input bytes are read from the input stream tong readLong: Reads a signed 64-bit integer value from the encapsulated input stream. This method blocks until all eight bytes are read from the input stream. String readUTF: Reads a string from the encapsulated input stream. Strings are stored in a format called UTF when they are written to streams [usually, you write them using DataOutputStream objects, the reciprocal class to the DatainputStream class) Figure 6: The types of data that can be read from a data input streams.